package me.tuyou.maven.plugin;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

@Mojo(name = "sayhi")
public class GreetingMojo extends AbstractMojo {

    @Parameter(defaultValue = "tuyou")
    private String name;

    @Parameter(defaultValue = "${project.build.sourceDirectory}")
    private String sourceDirectory;

    @Override
    public void execute() throws MojoExecutionException {
        getLog().info("Hello, world:" + name);
        getLog().info("sourceDirectory:" + sourceDirectory);
    }
}